package com.oms.web.form;


import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import com.oms.web.annotation.CheckUserEmail;
import com.oms.web.annotation.CheckUserName;


public class RegisteForm {
	
	@NotEmpty(message="用户名不能为空")
	@Length(max=16,message="用户名不能超过16个字符")
	@CheckUserName
	private String name;
	
	@NotEmpty(message="邮箱不能为空")
	@Email
	@CheckUserEmail
	private String email;
	
	@NotEmpty(message="密码不能为空")
	@Length(min=6,max=16,message="密码长度要在6到16位之间")
	@Pattern(regexp="\\w*",message="只能输入大小写字母和数字")
	private String password;

	@NotEmpty(message="密码不能为空")
	@Length(min=6,max=16,message="密码长度要在6到16位之间")
	@Pattern(regexp="\\w*",message="只能输入大小写字母和数字")
	private String password2;
	
	@NotEmpty
	@Length(min=6,max=16,message="密码长度要在6到16位之间")
	private String valistr;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEmail() {
		return email;
	}
	public String getValistr() {
		return valistr;
	}
	public void setValistr(String valistr) {
		this.valistr = valistr;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getPassword2() {
		return password2;
	}
	public void setPassword2(String password2) {
		this.password2 = password2;
	}
	
	
}
